home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today (Latin America) Volume 1 #6 / CD-ROM Today 6 Latam.iso / referenc / evol / database.dxr / 00094_CTZ.ls < prev    next >
Encoding:
Text File  |  1996-11-08  |  1.8 KB  |  76 lines

  1. on CheckTextZones
  2.   global mc, mw, ml, gTraceMem, gbTraceLine
  3.   set ReturnVal to 0
  4.   if LazyIsField(mc) then
  5.     set i to the foreColor of word mw of field member mc
  6.     if HotColour(i) then
  7.       set LeftIndex to BuildMouseWordPhrase(i)
  8.       GetColourIndex(LeftIndex)
  9.       set ReturnVal to 1
  10.       DBfingerCursor()
  11.       DeleteTrailingFullStop()
  12.     end if
  13.     if mc = gTraceMem then
  14.       set gbTraceLine to ml
  15.     end if
  16.   end if
  17.   return ReturnVal
  18. end
  19.  
  20. on LazyIsField cn
  21.   if cn <= 0 then
  22.     return 0
  23.     exit
  24.   end if
  25.   return the type of member cn = #field
  26. end
  27.  
  28. on HotColour C
  29.   return (C mod 255) <> 0
  30. end
  31.  
  32. on BuildMouseWordPhrase i
  33.   global mc, mw, gNextArticle
  34.   set left to mw
  35.   set right to mw
  36.   set bCR to 0
  37.   repeat while (the foreColor of word left - 1 of field member mc = i) and (left >= 1) and not bCR
  38.     set left to left - 1
  39.     set bCR to word left to right of field member mc contains RETURN
  40.   end repeat
  41.   if bCR then
  42.     set left to left + 1
  43.   end if
  44.   set bCR to 0
  45.   set wc to the number of words in field member mc
  46.   repeat while (the foreColor of word right + 1 of field member mc = i) and (right <= wc) and not bCR
  47.     set right to right + 1
  48.     set bCR to word left to right of field member mc contains RETURN
  49.   end repeat
  50.   if bCR then
  51.     set right to right - 1
  52.   end if
  53.   set gNextArticle to word left to right of field member mc
  54.   return left
  55. end
  56.  
  57. on GetColourIndex LeftIndex
  58.   global mc, gColorList, wColor
  59.   set fg to the foreColor of word LeftIndex of field member mc
  60.   set wColor to getPos(gColorList, fg)
  61.   if wColor = 0 then
  62.     set wColor to 1
  63.   end if
  64. end
  65.  
  66. on DeleteTrailingFullStop
  67.   global gNextArticle
  68.   set L to length(gNextArticle)
  69.   if L then
  70.     if char L of gNextArticle = "." then
  71.       delete char L of gNextArticle
  72.     end if
  73.   end if
  74.   set gNextArticle to wordFilter(gNextArticle)
  75. end
  76.